import java.util.Scanner;
public class Test7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("请输入年份: ");
        int year = scanner.nextInt();

        System.out.print("请输入月份: ");
        int month = scanner.nextInt();

        System.out.print("请输入日期: ");
        int day = scanner.nextInt();

        int sum = 0;
        for (int i = 1; i < month; i++) {
            switch (i) {
                case 1:
                case 3:
                case 5:
                case 7:
                case 8:
                case 10:
                case 12:
                    sum += 31;
                    break;
                case 4:
                case 6:
                case 9:
                case 11:
                    sum += 30;
                    break;
                case 2:
                    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
                        sum += 29;
                    } else {
                        sum += 28;
                    }
                    break;
            }
        }

        sum += day;

        System.out.println(year + "年" + month + "月" + day + "日是这一年的第 " + sum + " 天。");
    }
}
